package com.yixin.hospital.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum FlowNoPrefixEnum {
    PURCHASE("CG", "您有新的采购审批"),
    REGISTER("ZC", "您有新的注册审批"),
    APPLY_TMP_DEPT("LB", "您有新的临时部门审批"),

    ;

    private final String code;
    private final String msg;

    public static String getDesc(String code) {
        for (FlowNoPrefixEnum flowNoPrefixEnum : FlowNoPrefixEnum.values()) {
            if (Objects.equals(flowNoPrefixEnum.getCode(), code)) {
                return flowNoPrefixEnum.getMsg();
            }
        }
        return "";
    }
}

